-- ----------------------------- 2024-04-23 add by jiangjl@sunwayworld.com--------------begin

-- 建表语句
CREATE TABLE T_LIMS_SYS_INFO( 
    ID NUMBER NOT NULL,
    SYSCODE VARCHAR2(33)  NULL,
    CREATEDBYID VARCHAR2(36)  NULL,
    CREATEDBYNAME VARCHAR2(60)  NULL,
    CREATEDTIME DATE NULL,
    CREATEDBYORGID VARCHAR2(36)  NULL,
    CREATEDBYORGNAME VARCHAR2(270)  NULL
 );
COMMENT ON TABLE T_LIMS_SYS_INFO IS '系统接口表';
COMMENT ON COLUMN T_LIMS_SYS_INFO.ID IS '主键';
COMMENT ON COLUMN T_LIMS_SYS_INFO.SYSCODE IS '接口编码';
COMMENT ON COLUMN T_LIMS_SYS_INFO.CREATEDBYID IS '制单人编码';
COMMENT ON COLUMN T_LIMS_SYS_INFO.CREATEDBYNAME IS '制单人名称';
COMMENT ON COLUMN T_LIMS_SYS_INFO.CREATEDTIME IS '制单时间';
COMMENT ON COLUMN T_LIMS_SYS_INFO.CREATEDBYORGID IS '制单人单位编码';
COMMENT ON COLUMN T_LIMS_SYS_INFO.CREATEDBYORGNAME IS '制单人单位名称';

ALTER TABLE T_LIMS_SYS_INFO ADD CONSTRAINT PK_LIMS_SYS_INFO PRIMARY KEY (ID);

-- 旧版审计跟踪，跟踪配置变更语句

INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','ID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','SYSCODE','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYNAME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDTIME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYORGID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYORGNAME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
COMMIT;

INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME)
VALUES ('T_LIMS_SYS_INFO', '1', 'jiangjl@sunwayworld.com', 'jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);

-- 审计跟踪V2，跟踪配置变更语句

INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','ID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','SYSCODE','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYORGID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_INFO','CREATEDBYORGNAME','1');
COMMIT;

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_SYS_INFO', '系统接口表', 'service', '1');
CREATE TABLE T_LIMS_SYS_PRODUCT( 
    ID NUMBER NOT NULL,
    SYSID NUMBER NULL,
    PRODUCTID NUMBER NULL,
    PRODUCTCODE VARCHAR2(33)  NULL,
    PRODUCTNAME VARCHAR2(99)  NULL,
    CREATEDBYID VARCHAR2(36)  NULL,
    CREATEDBYNAME VARCHAR2(60)  NULL,
    CREATEDTIME DATE NULL,
    CREATEDBYORGID VARCHAR2(36)  NULL,
    CREATEDBYORGNAME VARCHAR2(270)  NULL
 );
COMMENT ON TABLE T_LIMS_SYS_PRODUCT IS '接口产品表';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.ID IS '主键';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.SYSID IS '接口id';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.PRODUCTID IS '产品id';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.PRODUCTCODE IS '产品编码';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.PRODUCTNAME IS '产品名称';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.CREATEDBYID IS '制单人编码';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.CREATEDBYNAME IS '制单人名称';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.CREATEDTIME IS '制单时间';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.CREATEDBYORGID IS '制单人单位编码';
COMMENT ON COLUMN T_LIMS_SYS_PRODUCT.CREATEDBYORGNAME IS '制单人单位名称';

ALTER TABLE T_LIMS_SYS_PRODUCT ADD CONSTRAINT PK_LIMS_SYS_PRODUCT PRIMARY KEY (ID);

-- 旧版审计跟踪，跟踪配置变更语句

INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','ID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','SYSID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','PRODUCTID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','PRODUCTCODE','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','PRODUCTNAME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYNAME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDTIME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYORGID','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYORGNAME','1','jiangjl@sunwayworld.com','jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);
COMMIT;

INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME)
VALUES ('T_LIMS_SYS_PRODUCT', '1', 'jiangjl@sunwayworld.com', 'jiangjl@sunwayworld.com', CURRENT_TIMESTAMP);

-- 审计跟踪V2，跟踪配置变更语句

INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','ID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','SYSID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','PRODUCTID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','PRODUCTCODE','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','PRODUCTNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYORGID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_SYS_PRODUCT','CREATEDBYORGNAME','1');
COMMIT;

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_SYS_PRODUCT', '接口产品表', 'service', '1');
CALL INSERTI18N('T_LIMS_SYS_INFO.SERVICE_NAME', '系统接口表', '系统接口表', 'zh-CN', '系统接口表');
CALL INSERTI18N('T_LIMS_SYS_INFO.ID', '系统接口表的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_SYS_INFO.SYSCODE', '系统接口表的接口编码', '接口编码', 'zh-CN', '接口编码');
CALL INSERTI18N('T_LIMS_SYS_INFO.CREATEDBYID', '系统接口表的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_SYS_INFO.CREATEDBYNAME', '系统接口表的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_SYS_INFO.CREATEDTIME', '系统接口表的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_SYS_INFO.CREATEDBYORGID', '系统接口表的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_SYS_INFO.CREATEDBYORGNAME', '系统接口表的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.SERVICE_NAME', '接口产品表', '接口产品表', 'zh-CN', '接口产品表');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.ID', '接口产品表的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.SYSID', '接口产品表的接口id', '接口id', 'zh-CN', '接口id');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.PRODUCTID', '接口产品表的产品id', '产品id', 'zh-CN', '产品id');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.PRODUCTCODE', '接口产品表的产品编码', '产品编码', 'zh-CN', '产品编码');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.PRODUCTNAME', '接口产品表的产品名称', '产品名称', 'zh-CN', '产品名称');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.CREATEDBYID', '接口产品表的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.CREATEDBYNAME', '接口产品表的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.CREATEDTIME', '接口产品表的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.CREATEDBYORGID', '接口产品表的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_SYS_PRODUCT.CREATEDBYORGNAME', '接口产品表的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('BASEMODULE.COREDATA.SYSPRODUCTS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.COREDATA.SYSPRODUCTS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.COREDATA.SYSPRODUCTS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.COREDATA.SYSPRODUCTS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.COREDATA.SYSPRODUCTS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

-- 创建菜单语句
INSERT INTO T_CORE_MENU (ID, MENUNAME, HREF, PARENTID, ORDERNO, ICON, MENUINITNAME)
VALUES ('-1', '接口产品', '/secure/basemodule/coredata/sys-products/page/edit-list', 'null', '-1', 'null', '接口产品');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_SYS_INFO', '0', '0');
INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_SYS_PRODUCT', '0', '0');


COMMIT;

-- ----------------------------- 2024-04-23 add by jiangjl@sunwayworld.com------------end